
var baseUrl = "https://autumnfish.cn/"
// 封装本地通用的get请求
function ajax_get(path, params = []) {
    return new Promise(function (resolve) {
        wx.request({
          url: baseUrl + path,
          data:params,
          success:res=>{
            resolve(res.data)
          }
        })
    })
}
var recommend = ()=> ajax_get("top/playlist");
var newestMusic = ()=> ajax_get("personalized/newsong");

var filters = {
    toFix:function(value){
        return value.toFixed(2)
    }
}
export {
    recommend,
		newestMusic,
		filters,
}